import { userInfo } from '@/services/api';
// 获取用户的信息
export const getUser = async () => {
  const res = await userInfo();
  if (res.status === 200) {
    return { ...res.data };
  }
  return { name: '未登录' };
};



function useAuth() {
  const token = localStorage.getItem('vehicle_token');
  if (token) {
    return { isLogin: true };
  }
  return { isLogin: false };
}

export default useAuth;
